<style type="text/css">
.fui-navbar ~ .fui-content, .fui-content.navbar{padding-bottom:0;}
.mask{
	position: fixed;
	background:rgba(0,0,0,0.5);
	width: 100%;
	height: 100%;
	top: 0;
	text-align: center;
	z-index: 100;
	display: none;
}
 .mask .code_box{
	position: absolute;
	margin-top:-10rem;
	top: 50%;
	left: 50%;
	margin-left: -7.5rem;
	width: 15rem;
	height: 20rem;
	background: #fff;
	border-radius:20px;
	line-height: 2.5rem;
	font-size: 0.7rem;
	color: #000;
	font-weight: bold;
}
 .mask .code_box img{
	width: 10rem;
	height: 10rem;
}
.mask .code_box .img_box{
	line-height: 3;
	height:auto;
} 
.mask .cav_code{
	width: 10rem;
	height: 1.8rem;
	line-height: 1.8rem;
	margin: auto;
	background: #f7f7f7;
	color: #6f6f6f;
}
 .mask .error{
	font-size: 0.65rem;
	line-height: 1.2rem;
	font-weight: normal;
	color: #e85a6a;
	margin-top: 0.5rem;
}
/*核销码*/
.code_box{
	text-align: center;
	background: #fff;
	height: 11.3rem;
	padding-top: 1.1rem;
	margin-bottom: 0.5rem;
}

.code_box img{
	height: 6.5rem;
	width: 6.5rem;
	margin-top: 0.2rem;
	vertical-align: middle;
}
.code_box .cav_code{
	height: 1.7rem;
	line-height: 1.7rem;
	margin: 0.7rem auto;
	margin-bottom: 0.55rem;
	background: #f7f7f7;
	width: 8.2rem;
	color: #666;
	font-size:0.8rem;
}
</style>
<div class='fui-page order-detail-page'>
    <div class="fui-header">
        <div class="fui-header-left" href="javascript:;" ng-click="access_json('jy_creditshop/log_list/')">
            <a class="back"></a>
        </div>
        <div class="title">订单详情</div>
        <div class="fui-header-right" href="javascript:;" ng-click="access_json('jy_creditshop/index/')">
            <span class="icon icon-home" style="font-size:1.1rem;"></span>
        </div>
    </div>
    <div class='fui-content'>
        <div class='fui-list-group result-list'>
            <div class='fui-list order-status'>
                <div class='fui-list-inner'>
					<div class='title'>{{pagedata.log.statustitle}}</div>
                    <div class='text'>
                        商品总额: {{pagedata.log.credit}}{{pagedata.log.credit_typetitle ||'积分'}}
						{{ifelse(pagedata.goods.money>0,pagedata.goods.money,'')}}金额
                       <span ng-if="pagedata.goods.goodstype==0 && pagedata.goods.isverify==0">
							{{ifelse(pagedata.goods.dispatch>0,pagedata.goods.dispatch,'免运费')}}运费
							</span>
                        
                    </div>
                </div>
                <div class='fui-list-media'>
                      
                            <i ng-if="pagedata.goods.goodstype==0 && pagedata.goods.isverify==1 && pagedata.log.status==2" class='icon icon-money'></i>
							<i ng-if="pagedata.goods.goodstype==0 && pagedata.goods.isverify!=1 && pagedata.log.status==2 && pagedata.log.time_send==0" class='icon icon-money'></i>
							<i ng-if="pagedata.goods.goodstype==0 && pagedata.goods.isverify!=1 && pagedata.log.status==2 && pagedata.log.time_send>0" class='icon icon-deliver'></i>
							<i ng-if="pagedata.goods.goodstype==0 && pagedata.log.status==3" class='icon icon-check'></i>
							<i ng-if="pagedata.goods.goodstype==1 && pagedata.log.status==3" class='icon icon-check'></i>
							<i ng-if="pagedata.goods.goodstype==2 && pagedata.log.status==3" class='icon icon-check'></i>
							<i ng-if="pagedata.goods.goodstype==3 && pagedata.log.status==2" class='icon icon-check'></i>
							<i ng-if="pagedata.log.status==1" class='icon icon-roundclose'></i> 
                </div>
            </div>
        </div>
        <div ng-if="pagedata.log.expresssn" class='fui-list-group' style='margin-top:5px;'>     
            <a ng-if="pagedata.log.expresssn">
                <div class='fui-list'>
                    <div class='fui-list-media'><i class='icon icon-deliver'></i></div>
                    <div class='fui-list-inner'>                       
                        <div ng-if="pagedata.log.express" class='text'><span>快递公司: {{pagedata.log.express.name}}</span></div>
                        <div ng-if="pagedata.log.express" class='text'><span>快递单号: {{pagedata.log.expresssn}}</span></div>
                    </div>
                    <div class='fui-list-angle'><span class='angle'></span></div>
                </div>
            </a>          
            <!--<div class='fui-list'>
                <div class='fui-list-media'><i class='icon icon-location'></i></div>
                <div class='fui-list-inner'>
                    <div class='title'>{{pagedata.address.realname}}{{pagedata.address.mobile}}</div>
                    <div class='text'>{{pagedata.address.pcd}}{{pagedata.address.address}}</div>
                </div>
            </div>-->
        </div>
		 <!--收货地址 -->
			<div id="addressInfo" ng-show="pagedata.goods.isverify==0 && pagedata.goods.goodstype==0" class="fui-cell-group fui-address-group" style="margin-top:0px">
			<div ng-if="pagedata.item.addressid" class="fui-cell">
				<div style="width:100%">
					<div class="fui-cell-text name bold" style="font-size:0.8rem">
						<span style="margin-right:20px">{{pagedata.item.address.name}}</span><span>{{pagedata.item.address.mobile}}</span>
					</div>
					<div class="fui-cell-text name" style="margin-top:5px">
						<!--预售完成-->
						<i class="fui-tag fui-tag-red">默认</i>
						<i class="fui-tag fui-tag-blue">家</i>
						{{pagedata.item.address.pcd.province+pagedata.item.address.pcd.city+pagedata.item.address.pcd.district+pagedata.item.address.address}}
					</div>
				</div>
				<div class="fui-cell-remark" ng-click="modal_func(pagedata.item,'address','core/member.address/')" ></div>
			</div>
			<div ng-if="!pagedata.item.addressid" class="fui-list-inner" ng-click="access_json('core/member.address/edit')">
                    <div class="text no-address" ><i class="icon jinyunicon icon-tianjia"></i> 添加收货地址</div>
            </div>
		</div>
		<div ng-if="pagedata.goods.type==0 && pagedata.goods.stores.length>0" class='fui-according-group'>
            <div class='fui-according'>
                <div class='fui-according-header'>
                    <i class='icon icon-shop'></i>
                    <span class="text">适用门店</span>
                    <span class="remark"><div class="badge">{{pagedata.goods.stores.length}}</div></span>
                </div>
				<div class="fui-list-group"  id="carrierInfo" style="margin: 0">
					<a class="fui-list"  ng-repeat="item in pagedata.goods.stores" href="javascript:;" ng-click="pagedata.selectstores(item.id);pagedata.selectstore = item;">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="subtitle" >
								<span style="overflow: hidden;">线下门店</span>
								<span class='realname'>{{item.title}}</span>
								
							</div>
							<div class="text address">地址：<span style="color:red">{{item.pcd.province}}</span>({{item.pcd.district}} {{item.pcd.street}} {{item.address}})</div>
						</div>
					</a>
				</div>
            </div>
		</div>    
        <div class="fui-list-group goods-list-group">
            <div ng-if="pagedata.set.shopname" class="fui-list-group-title"><i class="icon icon-shop"></i> {{pagedata.set.shopname}}</div>
            <a  href="javascript:;" ng-click="access_json('jy_creditshop/goods_detail//id='+pagedata.goods.id)" class="external">
                <div class="fui-list goods-list">
                    <div class="fui-list-media">
                        <img ng-src="{{tomedia(pagedata.goods.thumb) || '../core/resource/images/nopic.jpg'}}" alt="{{pagedata.goods.title}}" class="round">
                    </div>
                    <div class="fui-list-inner">
                        <div class="text goodstitle">{{pagedata.goods.title}}</div>
                        <div ng-if="pagedata.log.optionid" class='subtitle' style="font-size:0.6rem;color:#999;">规格：{{pagedata.goods.optiontitle}}</div>
						<div class="subtitle">店：{{item.merchname || '平台'}}</div>
                    </div>
                    <div class='fui-list-angle'>
                        <span ng-if="pagedata.goods.money>0" class='marketprice'>
                            {{pagedata.log.taocan.credit}}{{pagedata.log.taocan.credit_title ||'积分'}}<br />&yen;{{pagedata.log.taocan.money}}
				            <br/>   x {{pagedata.log.total || 1}}
                        </span>
						<span ng-if="pagedata.goods.money<=0" class='marketprice'>
                            {{pagedata.log.taocan.credit}}{{pagedata.log.taocan.credit_title ||'积分'}}
				            <br/>   x {{pagedata.log.total || 1}}
                        </span>
                    </div>
                </div>
            </a>
        </div>
      
        <div ng-if="pagedata.order.virtual && pagedata.order.virtual_str" class='fui-according-group'>
            <div class='fui-according expanded'>
                <div class='fui-according-header'>
                    <i class='icon icon-productfeatures'></i>
                    <span class="text">发货信息</span>
                    <span class="remark"></span>
                </div>
                <div class="fui-according-content">
                    <div class='content-block'>
                        {{pagedata.order.virtual_str}}
                    </div>
                </div>
            </div>
		</div>
        
        
        <div ng-if="pagedata.order.isvirtualsend && pagedata.order.virtualsend_info" class='fui-according-group'>
            <div class='fui-according expanded'>
                <div class='fui-according-header'>
                    <i class='icon icon-productfeatures'></i>
                    <span class="text">发货信息</span>
                    <span class="remark"></span>
                </div>
                <div class="fui-according-content">
                    <div class='content-block'>
                        {{pagedata.order.virtualsend_info}}
                    </div>
                </div>
            </div>
		</div>
        <div ng-if="pagedata.goods.isverify==1 && pagedata.log.status>1" class='fui-according-group expanded verify-container' data-verifytype="{{pagedata.goods.verifytype}}" data-orderid="{{pagedata.log.id}}">
            <div class='fui-according'>
                <div class='fui-according-header' ng-click="pagedata.showcode=true">
                    <i class='icon icon-list'></i>
                    <span class="text">兑奖码</span>
                    <span class="remark"><div class="badge">1</div></span>
                </div>
                <div class="verifycode-container" ng-if="pagedata.showcode">
                    <div class='fui-cell-group'>
                        <div class='fui-cell verify-cell' data-verifycode="{{pagedata.log.verifycode}}">
                            <div class='fui-cell-label' style='width:auto'>
                                {{pagedata.log.verifycode}}
                            </div>
                            <div class='fui-cell-info'></div>
                            <div class='fui-cell-remark noremark' ng-click="pagedata.show_verify(pagedata.log.verifyurl,pagedata.log.verifycode)">
                               
                                <div ng-if="pagedata.verify.isverify==1" class='fui-label fui-label-danger' >已使用</div>
                                
                                            <div ng-if="pagedata.verify.isverify!=1 && pagedata.goods.verifytype==1 && pagedata.verify.verifynum==0" class='fui-label fui-label-danger' >已使用</div>
                                
                                            <div ng-if="pagedata.verify.isverify!=1 && pagedata.goods.verifytype==1 && pagedata.verify.verifynum!=0" class='fui-label fui-label-default' >剩余{{pagedata.verify.verifynum || 0}} 次</div>
                                 
                                 
                                        <div ng-if="pagedata.verify.isverify!=1 && pagedata.goods.verifytype!=1" class='fui-label fui-label-default' >未使用</div>
                             
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>   
        <div ng-if="pagedata.stores.length>0 && pagedata.log.status > 1" class='fui-according-group'>
            <div class='fui-according'>
                <div class='fui-according-header'>
                    <i class='icon icon-shop'></i>
                    <span class="text">适用门店</span>
                    <span class="remark"><div class="badge">{{pagedata.stores.length}}</div></span>
                </div>
                <div class="fui-according-content store-container"> 
                    <div ng-repeat="item in pagedata.stores"  class="fui-list store-item">
                        <div class="fui-list-media">
                            <i class='icon icon-shop'></i>
                        </div>
                        <div class="fui-list-inner store-inner">
                            <div class="title"> <span class='storename'>{{item.storename}}</span></div>
                            <div class="text">
                                <span class='realname'>{{item.realname}}</span> <span class='mobile'>{{item.mobile}}</span>
                            </div>
                            <div class="text">
                                <span class='address'>{{item.address}}</span>
                            </div>
                            <div class="text location" style="color:green;display:none">正在计算距离...</div>
                        </div>
                        <div class="fui-list-angle ">
                            <a ng-if="pagedata.item.tel" href="tel:{{item.tel}}" class='external '><i class=' icon icon-phone' style='color:green'></i></a>
                            <a href="javascript:" ng-click="access_json('jy_weishop/store.map/map/id='+item.id)" class='external' ><i class='icon icon-location' style='color:#f90'></i></a>
                        </div>
                    </div>
                   
                </div>
                <div id="nearStore" style="display:none">
                    <div class='fui-list store-item'  id='nearStoreHtml'></div>
                </div>
            </div></div>
       
        <div class='fui-cell-group'>
            <div class="fui-cell">
                <div class="fui-cell-label">商品小计</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark">{{pagedata.log.credit}}{{pagedata.log.credit_typetitle ||'积分'}} + &yen;{{pagedata.log.totalprice}}</div>
            </div>
			<div ng-if="pagedata.log.set_credit1>0" class="fui-cell">
                <div class="fui-cell-label">赠送积分</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark">{{pagedata.log.set_credit1}}积分</div>
            </div>
            <div ng-if="pagedata.goods.goodstype==0 && pagedata.goods.isverify==0" class="fui-cell">
                <div class="fui-cell-label">运费</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark">{{ifelse(pagedata.goods.dispatch>0,pagedata.goods.dispatch,'免运费')}}</div>
            </div>
            
            <div class="fui-cell">
                <div ng-if="pagedata.goods.isverify==0" class="fui-cell-label" style='width:auto;'>
                    实付费(含运费)
                </div> 
				<div ng-if="pagedata.goods.isverify!=0" class="fui-cell-label" style='width:auto;'>
                    实付费
                </div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark">
                    <span ng-if="(pagedata.goods.money+pagedata.goods.dispatch)>0" class='text-danger2'>
                        {{pagedata.log.credit}}{{pagedata.log.credit_typetitle ||'积分'}}+ &yen; {{pagedata.log.money}}
                    </span>
					<span ng-if="(pagedata.goods.money+pagedata.goods.dispatch)<=0" class='text-danger2'>
                        {{pagedata.log.credit}}{{pagedata.log.credit_typetitle ||'积分'}}
                    </span>
                </div>
            </div>
        </div>
        <div class="fui-cell-group">
            <div class="fui-cell">
                <div class="fui-cell-label">订单编号:</div>
                <div class="fui-cell-info">{{pagedata.log.logno}}</div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label">创建时间:</div>
                <div class="fui-cell-info">{{pagedata.log.createtime}}</div>
            </div>
            
            <div ng-if="pagedata.log.status>=1" class="fui-cell">
                <div class="fui-cell-label">支付时间: </div>
                <div class="fui-cell-info">{{pagedata.log.createtime}}</div>
            </div>
           
          
            <div ng-if="pagedata.log.status>=2 && pagedata.log.time_send" class="fui-cell">
                <div class="fui-cell-label">发货时间: </div>
                <div class="fui-cell-info">{{pagedata.log.time_send}}</div>
            </div>
            
            
            <div ng-if="pagedata.log.status==3 && pagedata.log.time_finish" class="fui-cell">
                <div class="fui-cell-label">完成时间: </div>
                <div class="fui-cell-info">{{pagedata.log.time_finish}}</div>
            </div>
          
        </div>
    </div>
    <div class='fui-footer'>
		<a class="btn btn-warning block btn-1" ng-click="access_json('jy_creditshop/log_list/')">返回列表</a>
        <a ng-if="pagedata.log.status ==0" class="btn btn-warning block btn-1" href="javascript:;" ng-click="pay_submit({},'jy_creditshop/log_list/pay/id='+pagedata.log.id,'jy_creditshop/log_list/')">支付兑换</a>
         <a ng-if="pagedata.goods.isverify==0 && pagedata.goods.goodstype==0 && pagedata.log.addressid==0 && pagedata.goods.dispatch >0" class="btn btn-warning block btn-1">支付运费</a>
        <a ng-if="pagedata.log.status ==1 && pagedata.goods.isverify==0 && pagedata.goods.goodstype==0 && pagedata.log.addressid==0 && pagedata.goods.dispatch <=0" class="btn btn-warning block btn-1" ng-click="access_json('jy_creditshop/log_detail/exchange/id='+pagedata.log.id)">确认兑换</a>
        <a ng-if="pagedata.goods.goodstype == 0 &&  pagedata.goods.isverify > 0 && (pagedata.log.status == 2 || pagedata.log.status == 3) && pagedata.verifynum > 0" class="btn btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/verify//logid='+pagedata.log.id+'&verifycode='+pagedata.log.eno)">
            <i class="icon icon-qrcode" style="vertical-align: middle;"></i>
            <span>兑换二维码</span>
        </a>
         <a ng-if="pagedata.set.isreply ==1  && pagedata.log.time_finish > 0 &&(pagedata.goods.goodstype==0 || pagedata.goods.goodstype==1)&& pagedata.log.status == 3 && pagedata.log.iscomment == 1" class="btn btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//goodsid='+pagedata.log.goodsid+'&logid='+pagedata.log.id)">追加评价</a>
         <a ng-if="pagedata.set.isreply ==1  && pagedata.log.time_finish > 0 &&(pagedata.goods.goodstype==0 || pagedata.goods.goodstype==1)&& pagedata.log.status == 3 && pagedata.log.iscomment == 0" class="btn btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//goodsid='+pagedata.log.goodsid+'&logid='+pagedata.log.id)">评价</a>
         <a ng-if="pagedata.set.isreply ==1  && pagedata.log.time_finish > 0 &&(pagedata.goods.goodstype==2 || pagedata.goods.goodstype==3)&& pagedata.log.status == 3 && pagedata.log.iscomment == 1" class="btn btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//goodsid='+pagedata.log.goodsid+'&logid='+pagedata.log.id)">追加评价</a>
         <a ng-if="pagedata.set.isreply ==1  && pagedata.log.time_finish > 0 &&(pagedata.goods.goodstype==2 || pagedata.goods.goodstype==3)&& pagedata.log.status == 3 && pagedata.log.iscomment == 0" class="btn btn-default" href="javascript:;" ng-click="access_json('jy_creditshop/comment//goodsid='+pagedata.log.goodsid+'&logid='+pagedata.log.id)">评价</a>    
        <div ng-if="pagedata.goods.goodstype==0 && pagedata.log.status==3 && pagedata.log.time_send>0 && pagedata.log.time_finish==0" class="btn btn-default btn-default-o order-finish" href="javascript:;" ng-click="post({id:pagedata.log.id},'jy_creditshop/log_list/receive/')">确认收货</div>
        <div ng-if="pagedata.goods.goodstype==3 && pagedata.log.status==2" class="btn btn-default btn-default-o order-packet" href="javascript:;" ng-click="post({logid:pagedata.log.id},'jy_creditshop/log_list/red/')">领取红包</div>
 
    </div>
</div>
<div class="mask">
		<div class="code_box">
							<p>请将二维码出示给店员</p>
							<div class="img_box" id="show_verify_ewm">
								
							</div>
							<div class="cav_code" id="show_verify_code"></div>
							<div class="error">
								<p style="padding: 0 1.3rem">温馨提示：为了更好的保护您利益,请不要轻易将您的核销二维码泄露给他人</p>
							</div>
	</div>
</div>
<script>
scope.pagedata.show_verify=function(url,code){
			scope.tool.qr(url,'show_verify_ewm',150)
			$('#show_verify_code').text(code);
			$('.mask').css({display:'block'});
}	
$('.mask').click(function(){
			$(this).css({display:'none'})
})
</script>